<div class="header"> 
    <h1 class="page-header">
        新闻管理
    </h1>
    <ol class="breadcrumb">
        <li><a href="#">首页</a></li>
        <li><a href="{:U('News/index')}">新闻列表</a></li>
        <li class="active"><a href="#">修改专业</a></li>
    </ol> 

</div>
<div id="page-inner">
    <!-- 内容开始 -->
    <div class="row">

        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                添加新闻
                </div> 
                <div class="panel-body"> 
                  <form class="form-horizontal" action="{:U('News/editNews')}" method="post" enctype="multipart/form-data">
                    <div class="form-group">
                      <label class="col-sm-2 control-label">标题</label>
                      <div class="col-sm-10">
                        <input type="hidden" name="id" value="{$res['id']}">
                        <input type="text" class="form-control" name="title" value="{$res['title']}" placeholder="标题">
                      </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">上传主图</label>
                        <div class="col-sm-10">
                          <input type="file" name="mainimg"  value="{$res['mainimg']}">
                          <p class="help-block">上传图片小于2M（格式为jpg, gif, png, jpeg）</p>
                        </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label">类型</label>
                      <div class="col-sm-10">
                        <input type="text" name="type" class="form-control" placeholder="类型" value="{$res['type']}">
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-sm-2 control-label">新闻内容</label>
                      <div class="col-sm-10">
                        <textarea id="editor_id" name="content" >{$res['content']}</textarea>
                      </div>
                    </div>
                    <div class="form-group">
                      <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-default">修改</button>
                      </div>
                    </div>
                  </form>  
                </div>
            </div>
        </div>                      
    </div>
    <!-- 内容结束 -->

</div>
<!-- /. PAGE INNER  -->
<script charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor-all.js"></script>
<script charset="utf-8" src="__PUBLIC__/kindeditor/lang/zh-CN.js"></script>
<script>
  KindEditor.ready(function(K) {
    window.editor = K.create('#editor_id');
  });
</script>
  